
package com.insigma.business.qrcode.common.dao;

import com.insigma.business.qrcode.common.dto.CommonAdminAreaBSearcher;
import com.insigma.business.qrcode.common.dto.req.QueryAreaStreetReqDTO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;


public interface CommonAdminAreaDao {

    
    List<CommonAdminAreaDO> search(final CommonAdminAreaBSearcher innerSearcher);

    
    CommonAdminAreaDO get(final String id);

    
    Integer insert(final CommonAdminAreaDO commonAdminAreaDO);

    
    Integer update(final CommonAdminAreaDO commonAdminAreaDO);

    
    Integer delete(@Param("id") final String id,
                   @Param("modifierType") final String modifierType,
                   @Param("modifierId") final Long modifierId);


    
    List<Map> selectCity();
    List<Map> selectCounty();
    List<Map> selectTown();
    List<Map> selectVillage();

    
    List<CommonAdminAreaDO> findSubAreaList(@Param("adminAreaCode") String adminAreaCode, @Param("level") int level);

    List<CommonAdminAreaDO> getAllSubArea(String areaCode);

    List<CommonAdminAreaDO> listByCodeAndLevel(@Param("areaCode")String areaCode, @Param("level")int level);

    List<CommonAdminAreaDO> findQGSubAreaList(@Param("areaLike")String areaLike, @Param("level")int level);

    CommonAdminAreaDO getQg(String id);

    List<CommonAdminAreaDO> getAllSubAreaOfQg(String code);

    List<CommonAdminAreaDO> getAllSubAreaOfQgByValue(String areaName);

    List<CommonAdminAreaDO> getSubAreaByValue(String areaName);


    Integer updateOfQg(CommonAdminAreaDO commonAdminAreaDO);


    List<CommonAdminAreaDO> getSubAreaByParentIDAndLevel(final QueryAreaStreetReqDTO queryAreaStreetReqDTO);
}
